package com.kaifamiao.www.demo.do0801.factory;

public class HumanFactory {
    public Human createHuman(int type){
        if(type == 0){
            return new BlackHuman();
        }else if (type == 1){
            return new WhiteHuman();
        }else{
            return new Chinese();
        }
    }
}
